
<?php
	/** 
	* Template Name: Wallpapers Archive
	*/
	$moranguinho = 'nao';
	$logged = 'sim';
	$id='diversao';
	include 'header.php';
?>
			<div class="wrapper-content">
				<?php include 'login-panel.php'; ?>
				<span class="clear"></span>				
				<div class="extra-wrapper-slide-diversao wallpaper-diversao">
					<div class="wrapper-slide-diversao">
						<ul>
							<?php $query = new WP_Query( 'post_type=wallpaper' ); ?>
							<?php $count = 1; ?>
							<?php $count2 = 1; ?>
							<?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
								<?php  if ($count%9 == 1)
							    {  
							         echo "<li>";
							    } ?>
							    <?php if($count2 == 3){ ?>
									<div>
									<?php $count2 = 1 ?>
								<?php  } else { ?>
									<div>
									<?php $count2++; ?>
								<?php } ?>
										<?php $show = get('opcoes_show');
										if($show==false && is_user_logged_in()==false) { ?>
											<a class="fancybox" href="#signin"><img class="not-logged-wallpapers"src="<?php bloginfo('template_directory')?>/img/wallpapers-not-loggeed.png?6" alt=""></a>
										<?php }
										$wallpaper_s = wp_get_attachment_image_src( get_post_thumbnail_id(), 'wallpaper-s'); $wallpaper_m = wp_get_attachment_image_src( get_post_thumbnail_id(), 'wallpaper-m'); $wallpaper_l = wp_get_attachment_image_src( get_post_thumbnail_id(), 'wallpaper-l');
										the_post_thumbnail('wallpaper-thumb'); ?>
										<?php if(is_user_logged_in() || $show){ ?>
											<span><a href="<?php echo $wallpaper_s[0] ?>" target="_blank">1024 x 768</a> • <a href="<?php echo $wallpaper_m[0] ?>" target="_blank">1280 x 800</a> • <a href="<?php echo $wallpaper_l[0] ?>" target="_blank">1440 x 900 </a></span>
										<?php } else { ?>
											<span class="nolink"></span>
										<?php } ?>
									</div>
									<?php if ($count%9 == 0)
								    {
								        echo "<span class='clear'></span></li>";
								    }
								    $count++; ?>
							<?php endwhile; endif; ?>
							<?php if ($count%9 != 1) echo "<span class='clear'></span></li>"; ?>
						</ul>
						<span class="clear"></span>
					</div><!-- /wrapper-slide-diversao -->
					<span class="clear"></span>
					<a href="#" class="wrapper-slide-diversao-control-prev">&lsaquo;</a>
					<a href="#" class="wrapper-slide-diversao-control-next">&rsaquo;</a>
					<span class="clear"></span>
					<img src="<?php bloginfo('template_directory')?>/img/moranguinho-wallpaper.png?7" alt="" class="moranguinho-wallpaper"/>
				</div><!-- /extra-wrapper-slide-diversao -->
				<span class="clear"></span>
				<div class="destaque-produtos">
					<?php include 'slide-produtos.php'; ?>
				</div><!-- /destaque-produtos -->
				<div class="wrapper-destaques-diversao">
					<div class="conteudo-exclusivo">
						<img src="<?php bloginfo('template_directory')?>/img/conteudos-exclusivos.png?5" alt=""/>
					</div>
					<ul>
						<li>
							<div class="tit-categoria">
								<a href="<?php bloginfo('url')?>/jogos"><span class="roxo-amarelo">Jogar</span>
								<img src="<?php bloginfo('template_directory')?>/img/moldura-destaque-categoria.png?6" alt=""/></a>
							</div>
							<div class="wrapper-img-destaque-diversao">
								<a href="<?php bloginfo('url')?>/jogos"><img src="<?php bloginfo('template_directory')?>/img/diversao-destaque-jogar.png?6" alt=""/></a>
							</div>
							<a href="<?php bloginfo('url')?>/jogos" class="clique-aqui">Clique Aqui</a>
						</li>
						<li>
							<div class="tit-categoria">
								<a href="<?php bloginfo('url')?>/desenhos"><span class="roxo">Desenhar</span>
								<img src="<?php bloginfo('template_directory')?>/img/moldura-destaque-categoria.png?6" alt=""/></a>
							</div>
							<div class="wrapper-img-destaque-diversao">
								<a href="<?php bloginfo('url')?>/desenhos"><img src="<?php bloginfo('template_directory')?>/img/diversao-destaque-desenhar.png?7" alt=""/></a>
							</div>
							<a href="<?php bloginfo('url')?>/desenhos" class="clique-aqui">Clique Aqui</a>
						</li>
						<li class="no-margin-right">
							<div class="tit-categoria">
								<a href="<?php bloginfo('url')?>/videos"><span class="amarelo">Vídeos</span>
								<img src="<?php bloginfo('template_directory')?>/img/moldura-destaque-categoria.png?6" alt=""/></a>
							</div>
							<div class="wrapper-img-destaque-diversao">
								<a href="<?php bloginfo('url')?>/videos"><img src="<?php bloginfo('template_directory')?>/img/diversao-destaque-videos.png" alt=""/></a>
							</div>
							<a href="<?php bloginfo('url')?>/videos" class="clique-aqui">Clique Aqui</a>
						</li>
						<span class="clear"></span>
					</ul>
					<span class="clear"></span>
				</div><!-- /wrapper-destaques-diversao -->
				<span class="clear"></span>
			</div><!-- /wrapper-content -->
			<span class="clear"></span>
		</div><!-- /container -->
		<span class="clear"></span>
	</div> <!-- /wrapper-container -->
	<span class="clear"></span>
<?php include 'footer.php'; ?>